<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* div{
            width: 100px;
            height: 100px;
            background-color: red; */
            /* 过度 */
            /* transition: all .2s ease 1s;
        }
        div:hover{ 
            width: 200px;
            height: 200px;
            background-color: aqua;
        }  */
        .bar{
            width: 150px;
            height: 15px;
            border: 1px solid black;
            border-radius: 7px;
        } 
        .bar_in{
            width: 50px;
            height: 100%;
            background-color: red;
            transition: all .7s;
        }
        .bar:hover .bar_in{
            width: 100%;

        }
    </style>
</head>
<body>
    <div></div>
    <div class="bar">
        <div class="bar_in"></div>
    </div>
</body>
</html>